package com.fj.order.feign.fallback;

import com.fj.domain.Product;
import com.fj.order.feign.ProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author fj
 * @date 2024/3/12 17:49
 */
@Service
@Slf4j
public class ProductServiceFallBack implements ProductService {
    @Override
    public Product getProduct(Integer pid) {
        log.info("feign调用失败，进入sentinel容错逻辑");
        return new Product();
    }

    @Override
    public Product reduceStock(Integer pid, Integer number) {
        log.info("feign调用失败，进入sentinel容错逻辑");
        return new Product();
    }
}
